package com.wonder.task;

import com.wonder.global.Global;
import com.wonder.netty.NettyConnectHelper;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@EnableScheduling
public class CheckTcpConnectTask {

//    @Scheduled(cron = " 0/5 * * * * ? ")
//    public void  checkReconnectTcpServer(){
//        System.out.println("发起重连检测");
//        if(!Global.getInstance().canTcpConnected){
//            //进行连接
//            System.out.println("执行连接");
//            NettyConnectHelper.doConnect();
//        }
//    }
}